package com.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 聊天室信息表
 * </p>
 *
 * @author sly
 * @since 2023-12-30
 */
@Getter
@Setter
@TableName("t_chat_message")
@ApiModel(value = "ChatMessageEntity对象", description = "聊天室信息表")
public class ChatMessageEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("聊天室id")
    @TableField("chatId")
    private Long chatId;

    @ApiModelProperty("用户id")
    @TableField("userId")
    private Long userId;

    @ApiModelProperty("用户名")
    @TableField("userName")
    private String userName;

    @ApiModelProperty("消息内容")
    @TableField("message")
    private String message;

    @ApiModelProperty("消息类型(0:文字,1:图片,2:视频)")
    @TableField("messageType")
    private Integer messageType;

    @ApiModelProperty("创建时间")
    @TableField("createTime")
    private Date createTime;

    @ApiModelProperty("消息附件md5")
    @TableField("messageUrl")
    private String messageUrl;
}
